//@author A0080917B

#include "stdafx.h"
#include "CppUnitTest.h"

using namespace Microsoft::VisualStudio::CppUnitTestFramework;

using namespace std;

namespace EditClassTest
{		
	TEST_CLASS(EditUnitTests)
	{
	public:

		TEST_METHOD(EditInvalidTaskIndexString)
		{
			string input = "testing invalid task index .d this edit will fail!";
			string expected = INPUTERROR_INVALIDTASKINDEX;
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = todoTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", doneTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditInvalidTaskIndexStringAndInt)
		{
			string input = "testing invalid task index 10 .d this edit will fail!";
			string expected = INPUTERROR_INVALIDTASKINDEX;
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = doneTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", doneTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}
		
		TEST_METHOD(EditInvalidTaskIndexOutOfRange)
		{
			string input = "18 .d testing invalid task index out of range error";
			string expected = INPUTERROR_INVALIDTASKINDEXOUTOFRANGE;
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = todoTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", doneTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditMissingParams)
		{
			string input = "17";
			string expected = INPUTERROR_MISSINGEDITPARAMS;
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = doneTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", doneTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditRepeatAttributes)
		{
			string input = "0 .s next Tuesday 1200 .d testing repeat attributes error .s this Tuesday 1200";
			string expected = INPUTERROR_REPEATATTRIBUTEKEYWORDS;
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = todoTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", doneTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditMissingAttributeParamStart)
		{
			string input = "9 .e .d testing missing attribute param .s next Tuesday 1200";
			string expected = INPUTERROR_MISSINGATTRIBUTEPARAM;
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = doneTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", doneTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditMissingAttributeParamMiddle)
		{
			string input = "9 .d testing missing attribute param .e .s next Tuesday 1200";
			string expected = INPUTERROR_MISSINGATTRIBUTEPARAM;
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = todoTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", doneTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditMissingAttributeParamEnd)
		{
			string input = "9 .d testing missing attribute param .s next Tuesday 1200 .e ";
			string expected = INPUTERROR_MISSINGATTRIBUTEPARAM;
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = doneTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", doneTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditInvalidAttributeKeyword)
		{
			string input = "17 -f testing invalid attribute keyword error";
			string expected = INPUTERROR_INVALIDATTRIBUTEKEYWORD;
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = todoTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", doneTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditMissingAttributeKeyword)
		{
			string input = "10 testing missing attribute keyword .s tomorrow 1800";
			string expected = INPUTERROR_MISSINGATTRIBUTEKEYWORD;
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = doneTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", doneTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditStartLaterThanEndTime)
		{
			string input = "5 .e 01/06/13 1200 .d testing specified end time earlier than start time error";
			string expected = INPUTERROR_STARTLATERTHANENDTIME;
			string feedback;

			std::string todoFileName = "testingTodo.txt";
			std::string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = todoTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", doneTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditOneDescriptionDeadline)
		{
			string input = "10 .d testing edit 1 attribute deadline";
			string expected = "Edited Description of DEADLINE (10):\nDescription:\t testing edit 1 attribute deadline\nDeadline:\t Fri, 14 Feb 2014, 12:00AM\nLocation:\t Lamborghini showroom - 30 Tebans Gardens Crescent S(608927)\n";
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = doneTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\ttesting edit 1 attribute deadline\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", doneTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditOneStartDateTimeFloatingToPartialTimed)
		{
			string input = "0 .s 15/02/14 1234";
			string expected = "Edited Start date-time of TO-DO to EVENT (0):\nDescription:\t Buy flowers for valentine's day\nStart date-time: Sat, 15 Feb 2014, 12:34PM\nLocation:\t Clementi MRT florist\n";
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = todoTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[P]\tBuy flowers for valentine's day\t15/02/14 1234\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditOneEndDateTimePartialTimedToTimed)
		{
			string input = "17 .e 16/02/14 1500";
			string expected = "Edited End date-time of EVENT (17):\nDescription:\t Time to sleep\nStart date-time: Sun, 16 Feb 2014, 06:00AM\nEnd date-time:\t Sun, 16 Feb 2014, 03:00PM\n";
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = doneTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[T]\tTime to sleep\t16/02/14 0600\t16/02/14 1500\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditOneLocationTimed)
		{
			string input = "8 .l testing edit 1 attribute timed - Chubby house";
			string expected = "Edited Location of EVENT (8):\nDescription:\t Hair cut for Vday\nStart date-time: Thu, 13 Feb 2014, 03:00PM\nEnd date-time:\t Thu, 13 Feb 2014, 05:00PM\nLocation:\t testing edit 1 attribute timed - Chubby house\n";
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = todoTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\ttesting edit 1 attribute timed - Chubby house", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditTwoDescriptionStartDateTimeFloatingToPartialTimed)
		{
			string input = "0 .d testing edit 2 attributes floating to partial timed .s 18/04/14 2330";
			string expected = "Edited Description and Start date-time of TO-DO to EVENT (0):\nDescription:\t testing edit 2 attributes floating to partial timed\nStart date-time: Fri, 18 Apr 2014, 11:30PM\nLocation:\t Clementi MRT florist\n";
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = doneTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[P]\ttesting edit 2 attributes floating to partial timed\t18/04/14 2330\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditTwoDescriptionEndDateTimeFloatingToDeadline)
		{
			string input = "1 .d testing edit 2 attributes floating to deadline .e 18/04/14 2330";
			string expected = "Edited Description and Deadline of TO-DO to DEADLINE (1):\nDescription:\t testing edit 2 attributes floating to deadline\nDeadline:\t Fri, 18 Apr 2014, 11:30PM\n";
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = todoTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[D]\ttesting edit 2 attributes floating to deadline\t-\t18/04/14 2330\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditTwoDescriptionLocationTimed)
		{
			string input = "11 .d testing edit 2 attributes timed .l blah blah boo!";
			string expected = "Edited Description and Location of EVENT (11):\nDescription:\t testing edit 2 attributes timed\nStart date-time: Fri, 14 Feb 2014, 08:00AM\nEnd date-time:\t Fri, 14 Feb 2014, 10:00AM\nLocation:\t blah blah boo!\n";
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = doneTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\ttesting edit 2 attributes timed\t14/02/14 0800\t14/02/14 1000\tblah blah boo!", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditTwoStartDateTimeEndDateTimeTimed)
		{
			string input = "6 .s 19/07/14 1900 .e 19/07/14 2100";
			string expected = "Edited Start date-time and End date-time of EVENT (6):\nDescription:\t Working part time\nStart date-time: Sat, 19 Jul 2014, 07:00PM\nEnd date-time:\t Sat, 19 Jul 2014, 09:00PM\nLocation:\t Google Inc\n";
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = todoTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t19/07/14 1900\t19/07/14 2100\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditTwoStartDateTimeLocationDeadlineToTimed)
		{
			string input = "7 .s 01/02/14 1900 .l bam bam boom!";
			string expected = "Edited Start date-time and Location of DEADLINE to EVENT (7):\nDescription:\t Complete Time Dilation Project\nStart date-time: Sat, 01 Feb 2014, 07:00PM\nEnd date-time:\t Thu, 13 Feb 2014, 12:00PM\nLocation:\t bam bam boom!\n";
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = doneTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[T]\tComplete Time Dilation Project\t01/02/14 1900\t13/02/14 1200\tbam bam boom!", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditTwoEndDateTimeLocationPartialTimedToTimed)
		{
			string input = "12 .e 23/08/14 1900 .l blam bloob bloe!";
			string expected = "Edited End date-time and Location of EVENT (12):\nDescription:\t Meet up with Gf till dunno what time\nStart date-time: Fri, 14 Feb 2014, 05:00PM\nEnd date-time:\t Sat, 23 Aug 2014, 07:00PM\nLocation:\t blam bloob bloe!\n";
			string feedback;

			string todoFileName = "testingTodo.txt";
			string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = todoTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Gf till dunno what time\t14/02/14 1700\t23/08/14 1900\tblam bloob bloe!", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditThreeDescriptionStartDateTimeEndDateTimeFloatingToTimed)
		{
			string input = "2 .d testing edit 3 attributes Floating to Timed .s 22/06/14 2100 .e 22/06/14 2300";
			string expected = "Edited Description, Start date-time and End date-time of TO-DO to EVENT (2):\nDescription:\t testing edit 3 attributes Floating to Timed\nStart date-time: Sun, 22 Jun 2014, 09:00PM\nEnd date-time:\t Sun, 22 Jun 2014, 11:00PM\n";
			string feedback;

			std::string todoFileName = "testingTodo.txt";
			std::string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = doneTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[T]\ttesting edit 3 attributes Floating to Timed\t22/06/14 2100\t22/06/14 2300\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditThreeDescriptionStartDateTimeLocationDeadlineToTimed)
		{
			string input = "7 .d testing edit 3 attributes deadline to timed .s 01/01/14 1300 .l in my room at 5:30am";
			string expected = "Edited Description, Start date-time and Location of DEADLINE to EVENT (7):\nDescription:\t testing edit 3 attributes deadline to timed\nStart date-time: Wed, 01 Jan 2014, 01:00PM\nEnd date-time:\t Thu, 13 Feb 2014, 12:00PM\nLocation:\t in my room at 5:30am\n";
			string feedback;

			std::string todoFileName = "testingTodo.txt";
			std::string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = todoTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[T]\ttesting edit 3 attributes deadline to timed\t01/01/14 1300\t13/02/14 1200\tin my room at 5:30am", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditThreeDescriptionEndDateTimeLocationPartialToTimed)
		{
			string input = "13 .d testing edit 3 attributes partial timed to timed .e 22/06/14 2300 .l in my room at 5:30am";
			string expected = "Edited Description, End date-time and Location of EVENT (13):\nDescription:\t testing edit 3 attributes partial timed to timed\nStart date-time: Sat, 15 Feb 2014, 08:00AM\nEnd date-time:\t Sun, 22 Jun 2014, 11:00PM\nLocation:\t in my room at 5:30am\n";
			string feedback;

			std::string todoFileName = "testingTodo.txt";
			std::string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = doneTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[T]\ttesting edit 3 attributes partial timed to timed\t15/02/14 0800\t22/06/14 2300\tin my room at 5:30am", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditThreeStartDateTimeEndDateTimeLocationTimed)
		{
			string input = "16 .s 15/04/14 1200 .e 01/06/14 2300 .l blah blah club";
			string expected = "Edited Start date-time, End date-time and Location of EVENT (16):\nDescription:\t PARTY!!! TIME TO LET YOUR HAIR LOOSE\nStart date-time: Tue, 15 Apr 2014, 12:00PM\nEnd date-time:\t Sun, 01 Jun 2014, 11:00PM\nLocation:\t blah blah club\n";
			string feedback;

			std::string todoFileName = "testingTodo.txt";
			std::string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = todoTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((unsigned int)18, todoTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/04/14 1200\t01/06/14 2300\tblah blah club", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

		TEST_METHOD(EditFour)
		{
			string input = "1 .d testing edit 4 attributes .s 01/06/14 1200 .e 01/06/14 1300 .l in my room at 5:30am";
			string expected = "Edited Description, Start date-time, End date-time and Location of TO-DO to EVENT (1):\nDescription:\t testing edit 4 attributes\nStart date-time: Sun, 01 Jun 2014, 12:00PM\nEnd date-time:\t Sun, 01 Jun 2014, 01:00PM\nLocation:\t in my room at 5:30am\n";
			string feedback;

			std::string todoFileName = "testingTodo.txt";
			std::string doneFileName = "testingDone.txt";
			Manipulator* todoTMPtr;
			todoTMPtr = new TextManipulatorStub(todoFileName);
			Manipulator* doneTMPtr;
			doneTMPtr = new TextManipulatorStub(doneFileName);

			TestMethods test(todoTMPtr, doneTMPtr);
			Manipulator* displayedTMPtr = doneTMPtr;
			int displayedTasksIndexesArray[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17};
			vector<int> displayedTasksIndexes(displayedTasksIndexesArray, displayedTasksIndexesArray + sizeof(displayedTasksIndexesArray)/sizeof(int));
			test.executeUpdateDisplayedTask(displayedTMPtr, displayedTasksIndexes);

			Edit e(todoTMPtr, doneTMPtr);

			try {
				feedback = e.executeInput(input);
			} catch(exception& exception) {
				feedback = exception.what();
			}

			Assert::AreEqual(expected, feedback);

			vector<Task> todoTaskVector;			
			todoTaskVector = todoTMPtr->read();

			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", todoTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[F]\tLearn guitar\t-\t-\t-", todoTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", todoTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", todoTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", todoTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", todoTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", todoTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", todoTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", todoTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", todoTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", todoTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", todoTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", todoTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", todoTaskVector[17].prepareLine());

			vector<Task> doneTaskVector;			
			doneTaskVector = doneTMPtr->read();

			Assert::AreEqual((unsigned int)18, doneTaskVector.size());
			Assert::AreEqual((string)"[F]\tBuy flowers for valentine's day\t-\t-\tClementi MRT florist", doneTaskVector[0].prepareLine());
			Assert::AreEqual((string)"[T]\ttesting edit 4 attributes\t01/06/14 1200\t01/06/14 1300\tin my room at 5:30am", doneTaskVector[1].prepareLine());
			Assert::AreEqual((string)"[F]\tBring parents to Madives\t-\t-\t-", doneTaskVector[2].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t10/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[3].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t11/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[4].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t12/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[5].prepareLine());
			Assert::AreEqual((string)"[T]\tWorking part time\t13/02/14 0800\t13/02/14 1200\tGoogle Inc", doneTaskVector[6].prepareLine());
			Assert::AreEqual((string)"[D]\tComplete Time Dilation Project\t-\t13/02/14 1200\t-", doneTaskVector[7].prepareLine());
			Assert::AreEqual((string)"[T]\tHair cut for Vday\t13/02/14 1500\t13/02/14 1700\tCubby House", doneTaskVector[8].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with Ex before Vday\t13/02/14 1900\t13/02/14 2300\tHotel Rendezous", doneTaskVector[9].prepareLine());
			Assert::AreEqual((string)"[D]\tOrder Lambogini for valentine\t-\t14/02/14 0000\tLamborghini showroom - 30 Tebans Gardens Crescent S(608927)", todoTaskVector[10].prepareLine());
			Assert::AreEqual((string)"[T]\tPacify wife\t14/02/14 0800\t14/02/14 1000\tin-law's place", doneTaskVector[11].prepareLine());
			Assert::AreEqual((string)"[P]\tMeet up with Gf till dunno what time\t14/02/14 1700\t-\tConcord Hotel", doneTaskVector[12].prepareLine());
			Assert::AreEqual((string)"[P]\tStart Revising for Exams\t15/02/14 0800\t-\t-", doneTaskVector[13].prepareLine());
			Assert::AreEqual((string)"[T]\tDo Time Dilation Project whenever I am free\t15/02/14 0800\t16/02/14 2359\t-", doneTaskVector[14].prepareLine());
			Assert::AreEqual((string)"[T]\tMeet up with friends for dinner\t15/02/14 1700\t15/02/14 2100\tEverything with Fries", doneTaskVector[15].prepareLine());
			Assert::AreEqual((string)"[T]\tPARTY!!! TIME TO LET YOUR HAIR LOOSE\t15/02/14 2300\t16/02/14 0400\tZouk", doneTaskVector[16].prepareLine());
			Assert::AreEqual((string)"[P]\tTime to sleep\t16/02/14 0600\t-\t-", doneTaskVector[17].prepareLine());

			delete todoTMPtr;
			delete doneTMPtr;
		}

	};
}